.class Lcom/glympse/android/glympse/DlgContactPicker$ContactsAdapter;
.super Landroid/widget/BaseExpandableListAdapter;
.source "DlgContactPicker.java"

# interfaces
.implements Landroid/widget/ExpandableListView$OnChildClickListener;
.implements Landroid/widget/ExpandableListView$OnGroupClickListener;
.implements Landroid/widget/ExpandableListView$OnGroupExpandListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/glympse/android/glympse/DlgContactPicker;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x2
    name = "ContactsAdapter"
.end annotation


# instance fields
.field private m_listPeople:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList",
            "<",
            "Lcom/glympse/android/glympse/DlgContactPicker$Person;",
            ">;"
        }
    .end annotation
.end field

.field private m_oLayoutInflater:Landroid/view/LayoutInflater;

.field final synthetic this$0:Lcom/glympse/android/glympse/DlgContactPicker;


# direct methods
.method public constructor <init>(Lcom/glympse/android/glympse/DlgContactPicker;)V
    .locals 23
    .parameter

    .prologue
    .line 366
    move-object/from16 v0, p1

    move-object/from16 v1, p0

    iput-object v0, v1, Lcom/glympse/android/glympse/DlgContactPicker$ContactsAdapter;->this$0:Lcom/glympse/android/glympse/DlgContactPicker;

    .line 238
    invoke-direct/range {p0 .. p0}, Landroid/widget/BaseExpandableListAdapter;-><init>()V

    .line 234
    new-instance v6, Ljava/util/ArrayList;

    invoke-direct {v6}, Ljava/util/ArrayList;-><init>()V

    move-object v0, v6

    move-object/from16 v1, p0

    iput-object v0, v1, Lcom/glympse/android/glympse/DlgContactPicker$ContactsAdapter;->m_listPeople:Ljava/util/ArrayList;

    .line 235
    const/4 v6, 0x0

    move-object v0, v6

    move-object/from16 v1, p0

    iput-object v0, v1, Lcom/glympse/android/glympse/DlgContactPicker$ContactsAdapter;->m_oLayoutInflater:Landroid/view/LayoutInflater;

    .line 240
    invoke-virtual/range {p1 .. p1}, Lcom/glympse/android/glympse/DlgContactPicker;->getContext()Landroid/content/Context;

    move-result-object v6

    invoke-static {v6}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object v6

    move-object v0, v6

    move-object/from16 v1, p0

    iput-object v0, v1, Lcom/glympse/android/glympse/DlgContactPicker$ContactsAdapter;->m_oLayoutInflater:Landroid/view/LayoutInflater;

    .line 242
    invoke-virtual/range {p1 .. p1}, Lcom/glympse/android/glympse/DlgContactPicker;->getContext()Landroid/content/Context;

    move-result-object v6

    invoke-virtual {v6}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v5

    .line 243
    .local v5, oContentResolver:Landroid/content/ContentResolver;
    invoke-static {}, Lcom/glympse/android/glympse/ContactsHelper;->Initialize()V

    .line 245
    const/16 v17, 0x0

    .line 246
    .local v17, oLastPerson:Lcom/glympse/android/glympse/DlgContactPicker$Person;
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/glympse/android/glympse/DlgContactPicker$ContactsAdapter;->m_listPeople:Ljava/util/ArrayList;

    move-object v6, v0

    new-instance v7, Lcom/glympse/android/glympse/DlgContactPicker$Person;

    const-string v8, "Twitter"

    const v9, 0x7f020032

    invoke-direct {v7, v8, v9}, Lcom/glympse/android/glympse/DlgContactPicker$Person;-><init>(Ljava/lang/String;I)V

    invoke-virtual {v6, v7}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 247
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/glympse/android/glympse/DlgContactPicker$ContactsAdapter;->m_listPeople:Ljava/util/ArrayList;

    move-object v6, v0

    new-instance v7, Lcom/glympse/android/glympse/DlgContactPicker$Person;

    const-string v8, "Facebook"

    const v9, 0x7f02002e

    invoke-direct {v7, v8, v9}, Lcom/glympse/android/glympse/DlgContactPicker$Person;-><init>(Ljava/lang/String;I)V

    invoke-virtual {v6, v7}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 253
    :try_start_0
    sget-object v6, Lcom/glympse/android/glympse/ContactsHelper;->ms_uriEmail:Landroid/net/Uri;

    .line 254
    sget-object v7, Lcom/glympse/android/glympse/ContactsHelper;->ms_astrEmailColumns:[Ljava/lang/String;

    .line 255
    sget-object v8, Lcom/glympse/android/glympse/ContactsHelper;->ms_strWhereEmail:Ljava/lang/String;

    const/4 v9, 0x0

    .line 256
    sget-object v10, Lcom/glympse/android/glympse/ContactsHelper;->ms_strOrderByEmail:Ljava/lang/String;

    .line 252
    invoke-virtual/range {v5 .. v10}, Landroid/content/ContentResolver;->query(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;

    move-result-object v15

    .line 260
    .local v15, oCursorEmails:Landroid/database/Cursor;
    sget-object v6, Lcom/glympse/android/glympse/ContactsHelper;->ms_uriPhone:Landroid/net/Uri;

    .line 261
    sget-object v7, Lcom/glympse/android/glympse/ContactsHelper;->ms_astrPhoneColumns:[Ljava/lang/String;

    .line 262
    const/4 v8, 0x0

    const/4 v9, 0x0

    .line 263
    sget-object v10, Lcom/glympse/android/glympse/ContactsHelper;->ms_strOrderByPhone:Ljava/lang/String;

    .line 259
    invoke-virtual/range {v5 .. v10}, Landroid/content/ContentResolver;->query(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    move-result-object v16

    .line 266
    .local v16, oCursorPhones:Landroid/database/Cursor;
    if-nez v15, :cond_1

    const/4 v6, 0x0

    move v12, v6

    .line 267
    .local v12, fMoreEmails:Z
    :goto_0
    if-nez v16, :cond_2

    const/4 v6, 0x0

    move v13, v6

    .line 269
    .local v13, fMorePhones:Z
    :goto_1
    const/16 v20, 0x0

    .local v20, strEmailName:Ljava/lang/String;
    const/16 v22, 0x0

    .local v22, strPhoneName:Ljava/lang/String;
    move-object/from16 v18, v17

    .line 272
    .end local v17           #oLastPerson:Lcom/glympse/android/glympse/DlgContactPicker$Person;
    .local v18, oLastPerson:Lcom/glympse/android/glympse/DlgContactPicker$Person;
    :goto_2
    if-nez v12, :cond_3

    if-nez v13, :cond_3

    .line 349
    if-eqz v16, :cond_0

    .line 351
    :try_start_1
    invoke-interface/range {v16 .. v16}, Landroid/database/Cursor;->close()V

    .line 352
    const/16 v16, 0x0

    .line 356
    :cond_0
    if-eqz v15, :cond_10

    .line 358
    invoke-interface {v15}, Landroid/database/Cursor;->close()V
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_1

    .line 359
    const/4 v15, 0x0

    move-object/from16 v17, v18

    .line 364
    .end local v12           #fMoreEmails:Z
    .end local v13           #fMorePhones:Z
    .end local v15           #oCursorEmails:Landroid/database/Cursor;
    .end local v16           #oCursorPhones:Landroid/database/Cursor;
    .end local v18           #oLastPerson:Lcom/glympse/android/glympse/DlgContactPicker$Person;
    .end local v20           #strEmailName:Ljava/lang/String;
    .end local v22           #strPhoneName:Ljava/lang/String;
    .restart local v17       #oLastPerson:Lcom/glympse/android/glympse/DlgContactPicker$Person;
    :goto_3
    return-void

    .line 266
    .restart local v15       #oCursorEmails:Landroid/database/Cursor;
    .restart local v16       #oCursorPhones:Landroid/database/Cursor;
    :cond_1
    :try_start_2
    invoke-interface {v15}, Landroid/database/Cursor;->moveToFirst()Z

    move-result v6

    move v12, v6

    goto :goto_0

    .line 267
    .restart local v12       #fMoreEmails:Z
    :cond_2
    invoke-interface/range {v16 .. v16}, Landroid/database/Cursor;->moveToFirst()Z
    :try_end_2
    .catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_0

    move-result v6

    move v13, v6

    goto :goto_1

    .line 275
    .end local v17           #oLastPerson:Lcom/glympse/android/glympse/DlgContactPicker$Person;
    .restart local v13       #fMorePhones:Z
    .restart local v18       #oLastPerson:Lcom/glympse/android/glympse/DlgContactPicker$Person;
    .restart local v20       #strEmailName:Ljava/lang/String;
    .restart local v22       #strPhoneName:Ljava/lang/String;
    :cond_3
    if-eqz v12, :cond_4

    if-nez v20, :cond_4

    .line 277
    const/4 v6, 0x0

    :try_start_3
    invoke-interface {v15, v6}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v6

    invoke-static {v6}, Lcom/glympse/platform/common/Helpers;->SafeStr(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v20

    .line 281
    :cond_4
    if-eqz v13, :cond_5

    if-nez v22, :cond_5

    .line 283
    const/4 v6, 0x0

    move-object/from16 v0, v16

    move v1, v6

    invoke-interface {v0, v1}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v6

    invoke-static {v6}, Lcom/glympse/platform/common/Helpers;->SafeStr(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v22

    .line 288
    :cond_5
    if-eqz v13, :cond_6

    if-eqz v12, :cond_a

    move-object/from16 v0, v20

    move-object/from16 v1, v22

    invoke-virtual {v0, v1}, Ljava/lang/String;->compareToIgnoreCase(Ljava/lang/String;)I

    move-result v6

    if-gtz v6, :cond_a

    .line 290
    :cond_6
    if-eqz v18, :cond_7

    move-object/from16 v0, v18

    iget-object v0, v0, Lcom/glympse/android/glympse/DlgContactPicker$Person;->m_strPerson:Ljava/lang/String;

    move-object v6, v0

    move-object v0, v6

    move-object/from16 v1, v20

    invoke-virtual {v0, v1}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v6

    if-nez v6, :cond_12

    .line 292
    :cond_7
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/glympse/android/glympse/DlgContactPicker$ContactsAdapter;->m_listPeople:Ljava/util/ArrayList;

    move-object v6, v0

    new-instance v17, Lcom/glympse/android/glympse/DlgContactPicker$Person;

    move-object/from16 v0, v17

    move-object/from16 v1, v20

    invoke-direct {v0, v1}, Lcom/glympse/android/glympse/DlgContactPicker$Person;-><init>(Ljava/lang/String;)V
    :try_end_3
    .catch Ljava/lang/Exception; {:try_start_3 .. :try_end_3} :catch_1

    .end local v18           #oLastPerson:Lcom/glympse/android/glympse/DlgContactPicker$Person;
    .restart local v17       #oLastPerson:Lcom/glympse/android/glympse/DlgContactPicker$Person;
    :try_start_4
    move-object v0, v6

    move-object/from16 v1, v17

    invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 295
    :goto_4
    const/4 v6, 0x1

    invoke-interface {v15, v6}, Landroid/database/Cursor;->getInt(I)I

    move-result v14

    .line 296
    .local v14, nType:I
    const/4 v6, 0x2

    invoke-interface {v15, v6}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v21

    .line 297
    .local v21, strLabel:Ljava/lang/String;
    const/4 v6, 0x3

    invoke-interface {v15, v6}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v19

    .line 299
    .local v19, strData:Ljava/lang/String;
    invoke-static/range {v19 .. v19}, Lcom/glympse/platform/common/Helpers;->IsEmpty(Ljava/lang/String;)Z

    move-result v6

    if-nez v6, :cond_9

    .line 301
    invoke-static/range {v21 .. v21}, Lcom/glympse/platform/common/Helpers;->IsEmpty(Ljava/lang/String;)Z

    move-result v6

    if-eqz v6, :cond_8

    .line 303
    invoke-static {v14}, Lcom/glympse/android/glympse/ContactsHelper;->GetEmailLabel(I)Ljava/lang/String;

    move-result-object v21

    .line 306
    :cond_8
    move-object/from16 v0, v17

    iget-object v0, v0, Lcom/glympse/android/glympse/DlgContactPicker$Person;->m_listContactInfos:Ljava/util/ArrayList;

    move-object v6, v0

    new-instance v7, Lcom/glympse/android/glympse/DlgContactPicker$ContactInfo;

    const/4 v8, 0x2

    .line 307
    const v9, 0x7f02008c

    move-object v0, v7

    move v1, v8

    move v2, v9

    move-object/from16 v3, v21

    move-object/from16 v4, v19

    invoke-direct {v0, v1, v2, v3, v4}, Lcom/glympse/android/glympse/DlgContactPicker$ContactInfo;-><init>(IILjava/lang/String;Ljava/lang/String;)V

    .line 306
    invoke-virtual {v6, v7}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 311
    :cond_9
    const/16 v20, 0x0

    .line 312
    invoke-interface {v15}, Landroid/database/Cursor;->moveToNext()Z
    :try_end_4
    .catch Ljava/lang/Exception; {:try_start_4 .. :try_end_4} :catch_0

    move-result v12

    move-object/from16 v18, v17

    .end local v17           #oLastPerson:Lcom/glympse/android/glympse/DlgContactPicker$Person;
    .restart local v18       #oLastPerson:Lcom/glympse/android/glympse/DlgContactPicker$Person;
    goto/16 :goto_2

    .line 318
    .end local v14           #nType:I
    .end local v19           #strData:Ljava/lang/String;
    .end local v21           #strLabel:Ljava/lang/String;
    :cond_a
    if-eqz v18, :cond_b

    :try_start_5
    move-object/from16 v0, v18

    iget-object v0, v0, Lcom/glympse/android/glympse/DlgContactPicker$Person;->m_strPerson:Ljava/lang/String;

    move-object v6, v0

    move-object v0, v6

    move-object/from16 v1, v22

    invoke-virtual {v0, v1}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v6

    if-nez v6, :cond_11

    .line 320
    :cond_b
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/glympse/android/glympse/DlgContactPicker$ContactsAdapter;->m_listPeople:Ljava/util/ArrayList;

    move-object v6, v0

    new-instance v17, Lcom/glympse/android/glympse/DlgContactPicker$Person;

    move-object/from16 v0, v17

    move-object/from16 v1, v22

    invoke-direct {v0, v1}, Lcom/glympse/android/glympse/DlgContactPicker$Person;-><init>(Ljava/lang/String;)V
    :try_end_5
    .catch Ljava/lang/Exception; {:try_start_5 .. :try_end_5} :catch_1

    .end local v18           #oLastPerson:Lcom/glympse/android/glympse/DlgContactPicker$Person;
    .restart local v17       #oLastPerson:Lcom/glympse/android/glympse/DlgContactPicker$Person;
    :try_start_6
    move-object v0, v6

    move-object/from16 v1, v17

    invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 323
    :goto_5
    const/4 v6, 0x1

    move-object/from16 v0, v16

    move v1, v6

    invoke-interface {v0, v1}, Landroid/database/Cursor;->getInt(I)I

    move-result v14

    .line 324
    .restart local v14       #nType:I
    const/4 v6, 0x2

    move-object/from16 v0, v16

    move v1, v6

    invoke-interface {v0, v1}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v21

    .line 325
    .restart local v21       #strLabel:Ljava/lang/String;
    const/4 v6, 0x3

    move-object/from16 v0, v16

    move v1, v6

    invoke-interface {v0, v1}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v19

    .line 327
    .restart local v19       #strData:Ljava/lang/String;
    invoke-static/range {v19 .. v19}, Lcom/glympse/platform/common/Helpers;->IsEmpty(Ljava/lang/String;)Z

    move-result v6

    if-nez v6, :cond_d

    .line 329
    invoke-static/range {v21 .. v21}, Lcom/glympse/platform/common/Helpers;->IsEmpty(Ljava/lang/String;)Z

    move-result v6

    if-eqz v6, :cond_c

    .line 331
    invoke-static {v14}, Lcom/glympse/android/glympse/ContactsHelper;->GetPhoneLabel(I)Ljava/lang/String;

    move-result-object v21

    .line 335
    :cond_c
    move-object/from16 v0, v17

    iget-object v0, v0, Lcom/glympse/android/glympse/DlgContactPicker$Person;->m_listContactInfos:Ljava/util/ArrayList;

    move-object v6, v0

    new-instance v7, Lcom/glympse/android/glympse/DlgContactPicker$ContactInfo;

    const/4 v8, 0x3

    .line 336
    invoke-static/range {v19 .. v19}, Lcom/glympse/platform/common/Recipient;->IsTwitterNumber(Ljava/lang/String;)Z

    move-result v9

    if-eqz v9, :cond_e

    const v9, 0x7f020090

    .line 339
    :goto_6
    move-object v0, v7

    move v1, v8

    move v2, v9

    move-object/from16 v3, v21

    move-object/from16 v4, v19

    invoke-direct {v0, v1, v2, v3, v4}, Lcom/glympse/android/glympse/DlgContactPicker$ContactInfo;-><init>(IILjava/lang/String;Ljava/lang/String;)V

    .line 335
    invoke-virtual {v6, v7}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 343
    :cond_d
    const/16 v22, 0x0

    .line 344
    invoke-interface/range {v16 .. v16}, Landroid/database/Cursor;->moveToNext()Z

    move-result v13

    move-object/from16 v18, v17

    .end local v17           #oLastPerson:Lcom/glympse/android/glympse/DlgContactPicker$Person;
    .restart local v18       #oLastPerson:Lcom/glympse/android/glympse/DlgContactPicker$Person;
    goto/16 :goto_2

    .line 337
    .end local v18           #oLastPerson:Lcom/glympse/android/glympse/DlgContactPicker$Person;
    .restart local v17       #oLastPerson:Lcom/glympse/android/glympse/DlgContactPicker$Person;
    :cond_e
    invoke-static/range {v19 .. v19}, Lcom/glympse/platform/common/Recipient;->IsFacebookNumber(Ljava/lang/String;)Z
    :try_end_6
    .catch Ljava/lang/Exception; {:try_start_6 .. :try_end_6} :catch_0

    move-result v9

    if-eqz v9, :cond_f

    const v9, 0x7f02008d

    goto :goto_6

    .line 338
    :cond_f
    const v9, 0x7f02008f

    goto :goto_6

    .line 362
    .end local v12           #fMoreEmails:Z
    .end local v13           #fMorePhones:Z
    .end local v14           #nType:I
    .end local v15           #oCursorEmails:Landroid/database/Cursor;
    .end local v16           #oCursorPhones:Landroid/database/Cursor;
    .end local v19           #strData:Ljava/lang/String;
    .end local v20           #strEmailName:Ljava/lang/String;
    .end local v21           #strLabel:Ljava/lang/String;
    .end local v22           #strPhoneName:Ljava/lang/String;
    :catch_0
    move-exception v6

    move-object v11, v6

    .line 364
    .local v11, e:Ljava/lang/Exception;
    :goto_7
    invoke-static {v11}, Lcom/glympse/platform/common/Helpers;->Log(Ljava/lang/Throwable;)V

    goto/16 :goto_3

    .line 362
    .end local v11           #e:Ljava/lang/Exception;
    .end local v17           #oLastPerson:Lcom/glympse/android/glympse/DlgContactPicker$Person;
    .restart local v12       #fMoreEmails:Z
    .restart local v13       #fMorePhones:Z
    .restart local v15       #oCursorEmails:Landroid/database/Cursor;
    .restart local v16       #oCursorPhones:Landroid/database/Cursor;
    .restart local v18       #oLastPerson:Lcom/glympse/android/glympse/DlgContactPicker$Person;
    .restart local v20       #strEmailName:Ljava/lang/String;
    .restart local v22       #strPhoneName:Ljava/lang/String;
    :catch_1
    move-exception v6

    move-object v11, v6

    move-object/from16 v17, v18

    .end local v18           #oLastPerson:Lcom/glympse/android/glympse/DlgContactPicker$Person;
    .restart local v17       #oLastPerson:Lcom/glympse/android/glympse/DlgContactPicker$Person;
    goto :goto_7

    .end local v17           #oLastPerson:Lcom/glympse/android/glympse/DlgContactPicker$Person;
    .restart local v18       #oLastPerson:Lcom/glympse/android/glympse/DlgContactPicker$Person;
    :cond_10
    move-object/from16 v17, v18

    .end local v18           #oLastPerson:Lcom/glympse/android/glympse/DlgContactPicker$Person;
    .restart local v17       #oLastPerson:Lcom/glympse/android/glympse/DlgContactPicker$Person;
    goto/16 :goto_3

    .end local v17           #oLastPerson:Lcom/glympse/android/glympse/DlgContactPicker$Person;
    .restart local v18       #oLastPerson:Lcom/glympse/android/glympse/DlgContactPicker$Person;
    :cond_11
    move-object/from16 v17, v18

    .end local v18           #oLastPerson:Lcom/glympse/android/glympse/DlgContactPicker$Person;
    .restart local v17       #oLastPerson:Lcom/glympse/android/glympse/DlgContactPicker$Person;
    goto :goto_5

    .end local v17           #oLastPerson:Lcom/glympse/android/glympse/DlgContactPicker$Person;
    .restart local v18       #oLastPerson:Lcom/glympse/android/glympse/DlgContactPicker$Person;
    :cond_12
    move-object/from16 v17, v18

    .end local v18           #oLastPerson:Lcom/glympse/android/glympse/DlgContactPicker$Person;
    .restart local v17       #oLastPerson:Lcom/glympse/android/glympse/DlgContactPicker$Person;
    goto/16 :goto_4
.end method


# virtual methods
.method public getChild(II)Ljava/lang/Object;
    .locals 1
    .parameter "nGroupPosition"
    .parameter "nChildPosition"

    .prologue
    .line 401
    iget-object v0, p0, Lcom/glympse/android/glympse/DlgContactPicker$ContactsAdapter;->m_listPeople:Ljava/util/ArrayList;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object p0

    .end local p0
    check-cast p0, Lcom/glympse/android/glympse/DlgContactPicker$Person;

    iget-object v0, p0, Lcom/glympse/android/glympse/DlgContactPicker$Person;->m_listContactInfos:Ljava/util/ArrayList;

    invoke-virtual {v0, p2}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    return-object v0
.end method

.method public getChildId(II)J
    .locals 2
    .parameter "nGroupPosition"
    .parameter "nChildPosition"

    .prologue
    .line 389
    shl-int/lit8 v0, p1, 0x10

    add-int/lit8 v1, p2, 0x1

    or-int/2addr v0, v1

    int-to-long v0, v0

    return-wide v0
.end method

.method public getChildView(IIZLandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
    .locals 4
    .parameter "nGroupPosition"
    .parameter "nChildPosition"
    .parameter "fIsLastChild"
    .parameter "oView"
    .parameter "oParent"

    .prologue
    .line 444
    invoke-virtual {p0, p1, p2}, Lcom/glympse/android/glympse/DlgContactPicker$ContactsAdapter;->getChild(II)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/glympse/android/glympse/DlgContactPicker$ContactInfo;

    .line 446
    .local v0, oContactInfo:Lcom/glympse/android/glympse/DlgContactPicker$ContactInfo;
    iget-object v1, p0, Lcom/glympse/android/glympse/DlgContactPicker$ContactsAdapter;->m_oLayoutInflater:Landroid/view/LayoutInflater;

    const v2, 0x7f030002

    const/4 v3, 0x0

    invoke-virtual {v1, v2, p5, v3}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;

    move-result-object p4

    .line 448
    const v1, 0x7f0c0003

    invoke-virtual {p4, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object p0

    .end local p0
    check-cast p0, Landroid/widget/ImageView;

    iget v1, v0, Lcom/glympse/android/glympse/DlgContactPicker$ContactInfo;->m_nImage:I

    invoke-virtual {p0, v1}, Landroid/widget/ImageView;->setImageResource(I)V

    .line 449
    const v1, 0x7f0c0006

    invoke-virtual {p4, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object p0

    check-cast p0, Landroid/widget/TextView;

    invoke-virtual {v0}, Lcom/glympse/android/glympse/DlgContactPicker$ContactInfo;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {p0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 451
    return-object p4
.end method

.method public getChildrenCount(I)I
    .locals 1
    .parameter "nGroupPosition"

    .prologue
    .line 377
    iget-object v0, p0, Lcom/glympse/android/glympse/DlgContactPicker$ContactsAdapter;->m_listPeople:Ljava/util/ArrayList;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object p0

    .end local p0
    check-cast p0, Lcom/glympse/android/glympse/DlgContactPicker$Person;

    iget-object v0, p0, Lcom/glympse/android/glympse/DlgContactPicker$Person;->m_listContactInfos:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    return v0
.end method

.method public getGroup(I)Ljava/lang/Object;
    .locals 1
    .parameter "nGroupPosition"

    .prologue
    .line 395
    iget-object v0, p0, Lcom/glympse/android/glympse/DlgContactPicker$ContactsAdapter;->m_listPeople:Ljava/util/ArrayList;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    return-object v0
.end method

.method public getGroupCount()I
    .locals 1

    .prologue
    .line 371
    iget-object v0, p0, Lcom/glympse/android/glympse/DlgContactPicker$ContactsAdapter;->m_listPeople:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    return v0
.end method

.method public getGroupId(I)J
    .locals 2
    .parameter "nGroupPosition"

    .prologue
    .line 383
    shl-int/lit8 v0, p1, 0x10

    int-to-long v0, v0

    return-wide v0
.end method

.method public getGroupView(IZLandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
    .locals 5
    .parameter "nGroupPosition"
    .parameter "fIsExpanded"
    .parameter "oView"
    .parameter "oParent"

    .prologue
    .line 407
    invoke-virtual {p0, p1}, Lcom/glympse/android/glympse/DlgContactPicker$ContactsAdapter;->getGroup(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/glympse/android/glympse/DlgContactPicker$Person;

    .line 409
    .local v0, oPerson:Lcom/glympse/android/glympse/DlgContactPicker$Person;
    iget-object v2, p0, Lcom/glympse/android/glympse/DlgContactPicker$ContactsAdapter;->m_oLayoutInflater:Landroid/view/LayoutInflater;

    const v3, 0x7f030003

    const/4 v4, 0x0

    invoke-virtual {v2, v3, p4, v4}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;

    move-result-object p3

    .line 411
    const v2, 0x7f0c0003

    invoke-virtual {p3, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object p0

    .end local p0
    check-cast p0, Landroid/widget/ImageView;

    iput-object p0, v0, Lcom/glympse/android/glympse/DlgContactPicker$Person;->m_oImageView:Landroid/widget/ImageView;

    .line 412
    const v2, 0x7f0c0006

    invoke-virtual {p3, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/TextView;

    .line 414
    .local v1, oTextView:Landroid/widget/TextView;
    iget-object v2, v0, Lcom/glympse/android/glympse/DlgContactPicker$Person;->m_oImageView:Landroid/widget/ImageView;

    iget v3, v0, Lcom/glympse/android/glympse/DlgContactPicker$Person;->m_nImage:I

    if-nez v3, :cond_2

    if-eqz p2, :cond_1

    const v3, 0x7f020058

    :goto_0
    invoke-virtual {v2, v3}, Landroid/widget/ImageView;->setImageResource(I)V

    .line 416
    const v2, 0x7f020032

    iget v3, v0, Lcom/glympse/android/glympse/DlgContactPicker$Person;->m_nImage:I

    if-ne v2, v3, :cond_3

    .line 417
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v2

    iget-object v2, v2, Lcom/glympse/platform/Platform;->m_oConfig:Lcom/glympse/platform/Config;

    invoke-virtual {v2}, Lcom/glympse/platform/Config;->HasTwitterCredentials()Z

    move-result v2

    if-eqz v2, :cond_3

    .line 418
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v2

    iget-object v2, v2, Lcom/glympse/platform/Platform;->m_oConfig:Lcom/glympse/platform/Config;

    iget-object v2, v2, Lcom/glympse/platform/Config;->m_strTwitterName:Ljava/lang/String;

    invoke-static {v2}, Lcom/glympse/platform/common/Helpers;->IsEmpty(Ljava/lang/String;)Z

    move-result v2

    if-nez v2, :cond_3

    .line 420
    new-instance v2, Ljava/lang/StringBuilder;

    iget-object v3, v0, Lcom/glympse/android/glympse/DlgContactPicker$Person;->m_strPerson:Ljava/lang/String;

    invoke-static {v3}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v3

    invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v3, " ("

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v3

    iget-object v3, v3, Lcom/glympse/platform/Platform;->m_oConfig:Lcom/glympse/platform/Config;

    iget-object v3, v3, Lcom/glympse/platform/Config;->m_strTwitterName:Ljava/lang/String;

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    const-string v3, ")"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 433
    :goto_1
    iget v2, v0, Lcom/glympse/android/glympse/DlgContactPicker$Person;->m_nImage:I

    if-eqz v2, :cond_0

    .line 435
    const/4 v2, 0x0

    const/4 v3, 0x3

    invoke-virtual {v1, v2, v3}, Landroid/widget/TextView;->setTypeface(Landroid/graphics/Typeface;I)V

    .line 438
    :cond_0
    return-object p3

    .line 414
    :cond_1
    const v3, 0x7f020059

    goto :goto_0

    :cond_2
    iget v3, v0, Lcom/glympse/android/glympse/DlgContactPicker$Person;->m_nImage:I

    goto :goto_0

    .line 422
    :cond_3
    const v2, 0x7f02002e

    iget v3, v0, Lcom/glympse/android/glympse/DlgContactPicker$Person;->m_nImage:I

    if-ne v2, v3, :cond_4

    .line 423
    sget-object v2, Lcom/glympse/android/glympseservice/GlympseService;->ms_oThis:Lcom/glympse/android/glympseservice/GlympseService;

    invoke-virtual {v2}, Lcom/glympse/android/glympseservice/GlympseService;->GetFacebook()Lcom/glympse/android/glympseservice/FacebookWrapper;

    move-result-object v2

    invoke-virtual {v2}, Lcom/glympse/android/glympseservice/FacebookWrapper;->IsSignedIn()Z

    move-result v2

    if-eqz v2, :cond_4

    .line 424
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v2

    iget-object v2, v2, Lcom/glympse/platform/Platform;->m_oConfig:Lcom/glympse/platform/Config;

    iget-object v2, v2, Lcom/glympse/platform/Config;->m_strFacebookName:Ljava/lang/String;

    invoke-static {v2}, Lcom/glympse/platform/common/Helpers;->IsEmpty(Ljava/lang/String;)Z

    move-result v2

    if-nez v2, :cond_4

    .line 426
    new-instance v2, Ljava/lang/StringBuilder;

    iget-object v3, v0, Lcom/glympse/android/glympse/DlgContactPicker$Person;->m_strPerson:Ljava/lang/String;

    invoke-static {v3}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v3

    invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v3, " ("

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v3

    iget-object v3, v3, Lcom/glympse/platform/Platform;->m_oConfig:Lcom/glympse/platform/Config;

    iget-object v3, v3, Lcom/glympse/platform/Config;->m_strFacebookName:Ljava/lang/String;

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    const-string v3, ")"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    goto :goto_1

    .line 430
    :cond_4
    iget-object v2, v0, Lcom/glympse/android/glympse/DlgContactPicker$Person;->m_strPerson:Ljava/lang/String;

    invoke-static {v2}, Lcom/glympse/platform/common/Helpers;->IsEmpty(Ljava/lang/String;)Z

    move-result v2

    if-eqz v2, :cond_5

    const-string v2, "Unnamed contacts"

    :goto_2
    invoke-virtual {v1, v2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    goto :goto_1

    :cond_5
    iget-object v2, v0, Lcom/glympse/android/glympse/DlgContactPicker$Person;->m_strPerson:Ljava/lang/String;

    goto :goto_2
.end method

.method public hasStableIds()Z
    .locals 1

    .prologue
    .line 457
    const/4 v0, 0x1

    return v0
.end method

.method public isChildSelectable(II)Z
    .locals 1
    .parameter "groupPosition"
    .parameter "childPosition"

    .prologue
    .line 463
    const/4 v0, 0x1

    return v0
.end method

.method public onChildClick(Landroid/widget/ExpandableListView;Landroid/view/View;IIJ)Z
    .locals 3
    .parameter "oParent"
    .parameter "oView"
    .parameter "nGroupPosition"
    .parameter "nChildPosition"
    .parameter "lId"

    .prologue
    .line 469
    iget-object v0, p0, Lcom/glympse/android/glympse/DlgContactPicker$ContactsAdapter;->this$0:Lcom/glympse/android/glympse/DlgContactPicker;

    invoke-static {v0}, Lcom/glympse/android/glympse/DlgContactPicker;->access$1(Lcom/glympse/android/glympse/DlgContactPicker;)Lcom/glympse/android/glympse/DlgContactPicker$OnContactPickerListener;

    move-result-object v0

    if-eqz v0, :cond_0

    .line 471
    iget-object v0, p0, Lcom/glympse/android/glympse/DlgContactPicker$ContactsAdapter;->this$0:Lcom/glympse/android/glympse/DlgContactPicker;

    invoke-static {v0}, Lcom/glympse/android/glympse/DlgContactPicker;->access$1(Lcom/glympse/android/glympse/DlgContactPicker;)Lcom/glympse/android/glympse/DlgContactPicker$OnContactPickerListener;

    move-result-object v2

    .line 472
    invoke-virtual {p0, p3}, Lcom/glympse/android/glympse/DlgContactPicker$ContactsAdapter;->getGroup(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/glympse/android/glympse/DlgContactPicker$Person;

    .line 473
    invoke-virtual {p0, p3, p4}, Lcom/glympse/android/glympse/DlgContactPicker$ContactsAdapter;->getChild(II)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/glympse/android/glympse/DlgContactPicker$ContactInfo;

    .line 471
    invoke-interface {v2, v0, v1}, Lcom/glympse/android/glympse/DlgContactPicker$OnContactPickerListener;->OnContactPicked(Lcom/glympse/android/glympse/DlgContactPicker$Person;Lcom/glympse/android/glympse/DlgContactPicker$ContactInfo;)V

    .line 477
    :cond_0
    iget-object v0, p0, Lcom/glympse/android/glympse/DlgContactPicker$ContactsAdapter;->this$0:Lcom/glympse/android/glympse/DlgContactPicker;

    invoke-virtual {v0}, Lcom/glympse/android/glympse/DlgContactPicker;->dismiss()V

    .line 480
    const/4 v0, 0x1

    return v0
.end method

.method public onGroupClick(Landroid/widget/ExpandableListView;Landroid/view/View;IJ)Z
    .locals 7
    .parameter "oParent"
    .parameter "oView"
    .parameter "nGroupPosition"
    .parameter "lId"

    .prologue
    const/4 v6, 0x0

    const v5, 0x7f020032

    const v4, 0x7f02002e

    .line 486
    invoke-virtual {p0, p3}, Lcom/glympse/android/glympse/DlgContactPicker$ContactsAdapter;->getGroup(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/glympse/android/glympse/DlgContactPicker$Person;

    .line 487
    .local v1, oPerson:Lcom/glympse/android/glympse/DlgContactPicker$Person;
    if-eqz v1, :cond_3

    iget v2, v1, Lcom/glympse/android/glympse/DlgContactPicker$Person;->m_nImage:I

    if-eqz v2, :cond_3

    .line 490
    const/4 v0, 0x0

    .line 491
    .local v0, oContactInfo:Lcom/glympse/android/glympse/DlgContactPicker$ContactInfo;
    iget v2, v1, Lcom/glympse/android/glympse/DlgContactPicker$Person;->m_nImage:I

    if-ne v5, v2, :cond_2

    .line 493
    new-instance v0, Lcom/glympse/android/glympse/DlgContactPicker$ContactInfo;

    .end local v0           #oContactInfo:Lcom/glympse/android/glympse/DlgContactPicker$ContactInfo;
    const/4 v2, 0x4

    const-string v3, "Twitter"

    invoke-direct {v0, v2, v5, v6, v3}, Lcom/glympse/android/glympse/DlgContactPicker$ContactInfo;-><init>(IILjava/lang/String;Ljava/lang/String;)V

    .line 501
    .restart local v0       #oContactInfo:Lcom/glympse/android/glympse/DlgContactPicker$ContactInfo;
    :cond_0
    :goto_0
    if-eqz v0, :cond_1

    iget-object v2, p0, Lcom/glympse/android/glympse/DlgContactPicker$ContactsAdapter;->this$0:Lcom/glympse/android/glympse/DlgContactPicker;

    invoke-static {v2}, Lcom/glympse/android/glympse/DlgContactPicker;->access$1(Lcom/glympse/android/glympse/DlgContactPicker;)Lcom/glympse/android/glympse/DlgContactPicker$OnContactPickerListener;

    move-result-object v2

    if-eqz v2, :cond_1

    .line 503
    iget-object v2, p0, Lcom/glympse/android/glympse/DlgContactPicker$ContactsAdapter;->this$0:Lcom/glympse/android/glympse/DlgContactPicker;

    invoke-static {v2}, Lcom/glympse/android/glympse/DlgContactPicker;->access$1(Lcom/glympse/android/glympse/DlgContactPicker;)Lcom/glympse/android/glympse/DlgContactPicker$OnContactPickerListener;

    move-result-object v2

    invoke-interface {v2, v1, v0}, Lcom/glympse/android/glympse/DlgContactPicker$OnContactPickerListener;->OnContactPicked(Lcom/glympse/android/glympse/DlgContactPicker$Person;Lcom/glympse/android/glympse/DlgContactPicker$ContactInfo;)V

    .line 507
    :cond_1
    iget-object v2, p0, Lcom/glympse/android/glympse/DlgContactPicker$ContactsAdapter;->this$0:Lcom/glympse/android/glympse/DlgContactPicker;

    invoke-virtual {v2}, Lcom/glympse/android/glympse/DlgContactPicker;->dismiss()V

    .line 510
    const/4 v2, 0x1

    .line 513
    .end local v0           #oContactInfo:Lcom/glympse/android/glympse/DlgContactPicker$ContactInfo;
    :goto_1
    return v2

    .line 495
    .restart local v0       #oContactInfo:Lcom/glympse/android/glympse/DlgContactPicker$ContactInfo;
    :cond_2
    iget v2, v1, Lcom/glympse/android/glympse/DlgContactPicker$Person;->m_nImage:I

    if-ne v4, v2, :cond_0

    .line 497
    new-instance v0, Lcom/glympse/android/glympse/DlgContactPicker$ContactInfo;

    .end local v0           #oContactInfo:Lcom/glympse/android/glympse/DlgContactPicker$ContactInfo;
    const/4 v2, 0x5

    const-string v3, "Facebook"

    invoke-direct {v0, v2, v4, v6, v3}, Lcom/glympse/android/glympse/DlgContactPicker$ContactInfo;-><init>(IILjava/lang/String;Ljava/lang/String;)V

    .restart local v0       #oContactInfo:Lcom/glympse/android/glympse/DlgContactPicker$ContactInfo;
    goto :goto_0

    .line 513
    .end local v0           #oContactInfo:Lcom/glympse/android/glympse/DlgContactPicker$ContactInfo;
    :cond_3
    const/4 v2, 0x0

    goto :goto_1
.end method

.method public onGroupExpand(I)V
    .locals 1
    .parameter "nGroup"

    .prologue
    .line 519
    iget-object v0, p0, Lcom/glympse/android/glympse/DlgContactPicker$ContactsAdapter;->this$0:Lcom/glympse/android/glympse/DlgContactPicker;

    invoke-static {v0}, Lcom/glympse/android/glympse/DlgContactPicker;->access$0(Lcom/glympse/android/glympse/DlgContactPicker;)Landroid/widget/ExpandableListView;

    move-result-object v0

    invoke-virtual {v0, p1}, Landroid/widget/ExpandableListView;->setSelectedGroup(I)V

    .line 520
    return-void
.end method
